+2008-09-29 Emmanuele Bassi <ebassi@linux.intel.com>
+
+ * gdk/x11/gdkinput.c:
+ (gdk_device_class_init), (gdk_device_finalize): Correctly chain
+ up the finalize implementation.
+
2008-09-29 Richard Hult <richard@imendio.com>
Bug 554141 – uninitialized data use/free in gtkclipboard-quartz.c
static void gdk_device_class_init (GdkDeviceClass *klass);
static void gdk_device_finalize (GObject *object);
+static gpointer gdk_device_parent_class = NULL;
+
GType
gdk_device_get_type (void)
{
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ gdk_device_parent_class = g_type_class_peek_parent (klass);
+
object_class->finalize = gdk_device_finalize;
}
GdkDevicePrivate *gdkdev = (GdkDevicePrivate *)GDK_DEVICE(object);
if (!GDK_IS_CORE (gdkdev))
- {
+ {
#ifndef XINPUT_NONE
- if (gdkdev->xdevice)
- XCloseDevice (GDK_DISPLAY_XDISPLAY(gdkdev->display), gdkdev->xdevice);
- g_free (gdkdev->axes);
+ if (gdkdev->xdevice)
+ XCloseDevice (GDK_DISPLAY_XDISPLAY(gdkdev->display), gdkdev->xdevice);
+
+ g_free (gdkdev->axes);
#endif /* !XINPUT_NONE */
- g_free (gdkdev->info.name);
- g_free (gdkdev->info.keys);
- g_free (gdkdev->info.axes);
- }
+ g_free (gdkdev->info.name);
+ g_free (gdkdev->info.keys);
+ g_free (gdkdev->info.axes);
+ }
+
+ G_OBJECT_CLASS (gdk_device_parent_class)->finalize (object);
}
/**